﻿<?php
/**
 * @copyright	Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
 * @license		GNU/GPL, see LICENSE.php
 * Joomla! is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * minhanh1985vn
 * See COPYRIGHT.php for copyright notices and details.
 */ 

// no direct access
defined ( '_FW_EXEC' ) or die ( 'Restricted access' );
//*
SysResponse::addStyleSheetFile ( SYS_CUR_TMPL_URL . "css/system.css" );
SysResponse::addStyleSheetFile ( SYS_CUR_TMPL_URL . "css/general.css" );
SysResponse::addStyleSheetFile ( SYS_CUR_TMPL_URL . "css/master.css" );
SysResponse::addStyleSheetFile ( SYS_CUR_TMPL_URL . "css/sites-index.css" );
// */
//global $language;
//if (empty($language)){
//	$language = SystemSite::getLanguage();
//}
//$language = $_REQUEST['lang'];
////RubikHelper::debugPrePrint($language);
$sql15 = "SELECT * FROM settings WHERE id = 15";
$result = SysDatabase::loadObject($sql15);
if($_REQUEST['lang'] == 'fr'){
	$meta = $result->content_fr;
} else if($_REQUEST['lang'] == 'en'){
	$meta = $result->content_en;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<!-- InstanceBegin template="/Templates/00-master.dwt" codeOutsideHTMLIsLocked="false" -->
<!-- Mirrored from www.ovguide.com/ by HTTrack Website Copier/3.x [XR&CO'2007], Mon, 02 Jun 2008 01:49:52 GMT -->
<!-- Added by HTTrack -->
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="<?php echo $meta?>" />
<?php
SysResponse::printHeaderHtml (); 
$url = SYS_ROOT_URL;
$root = SYS_ROOT_URL;

//-----Load logo--------
$sql = "SELECT * FROM settings WHERE id = 1";
$result = SysDatabase::loadObject($sql);
$logo = $result->svalue; 
if($_REQUEST['lang'] == 'fr'){
	$slogan = $result->content_fr;
} else if($_REQUEST['lang'] == 'en'){
	$slogan = $result->content_en;
}

//------Load banner------------
$sql1 = "SELECT * FROM settings WHERE id = 2";
$result1 = SysDatabase::loadObject($sql1);
$banner = $result1->svalue; 
$des = $result1->content;
//------Load footer------------
$sql2 = "SELECT * FROM settings WHERE id = 4";
$result2 = SysDatabase::loadObject($sql2);
if($_REQUEST['lang'] == 'fr'){
	$footer = $result2->content_fr;
	$homes = "Accueil";
	$aboutus = "KBBV";
	$gallerys = "Galerie";
	$contacts = "Nous contacter";
	$username = "Pseudo";
	$password = "Mot de passe";
	$register = "Inscription";
	$forgot = "Password oublié";
	$en = "";
	$fr = "border:1px solid #EEEEEE";
	
} else if($_REQUEST['lang'] == 'en'){
	$footer = $result2->content_en;
	$homes = "Home";
	$aboutus = "About us";
	$gallerys = "Gallery";
	$contacts = "Contact us";
	$username = "Username";
	$password = "Password";
	$register = "Register";
	$forgot = "Forgot";
	$en = "border:1px solid #EEEEEE";
	$fr = "";
	
}
$dis = "";
if(!empty($_SESSION['username'])){
	$dis = "display:none";
	
}
$lang = $_REQUEST['lang'];

//---load language-------------
$sql = "SELECT * FROM site_language ORDER BY ordering";
		$langList = SysDatabase::loadObjectList($sql);

		$res = SysRequest::cloneResource();
		foreach ($langList as $langDto) {
			$res->setExtend('lang', $langDto->code);
			$link = $res->getLink();
			$name = $langDto->name;
			$code = $langDto->code;
			//$flagsHtml .= "<div class=\"$code\"><a href=\"$link\">$name</a></div>";
			$flagsHtml .= '<a href='.$link.' style="margin-left:10px"><img class="'.$code.'" src="'.$root.'templates/kbbv/images/'.$code.'.jpg" width="23px" height="14px" style="margin-right:2px"/> '.$name.'</a>';
		}
		/*
		/*if($_REQUEST['lang'] == 'fr'){
			echo '<style>.vi{display:none}</style>';
		} else if($_REQUEST['lang'] == 'en'){
			echo '<style>.en{display:none}</style>';
		}*/
//----------------Menu CSS---------------------
//-------------facebook, twitter, google link-------------
		$sqlFB = "SELECT * FROM settings WHERE id = 12";
		$resultFB = SysDatabase::loadObject($sqlFB);
		if ($resultFB->content_en != null){
			$fb_link = $resultFB->content_en; 
		}else {
			$fb_link = $resultFB->content_vi;
		}
		
		$sqlTW = "SELECT * FROM settings WHERE id = 13";
		$resultTW = SysDatabase::loadObject($sqlTW);
		if ($resultTW->content_en != null){
			$twitter_link = $resultTW->content_en; 
		}else {
			$twitter_link = $resultTW->content_vi;
		}
		
		$sqlGG = "SELECT * FROM settings WHERE id = 14";
		$resultGG = SysDatabase::loadObject($sqlGG);
		if ($resultGG->content_en != null){
			$google_link = $resultGG->content_en; 
		}else {
			$google_link = $resultGG->content_vi;
		}
		
		
//-------------End of facebook, twitter, google link-------------
$contact = "";
$home = "";
$about = "";
$gallery = "";
$app = SysRequest::getVar("app");

if ($app == "" || $app == "home"|| $app == "event"){
	$home = ' class="current_page_item" ';
	$contact = "";
	$about = "";
	$gallery = "";
}
else if ($app == "partner" || $app == "showcase" || $app == "memberVideo" || $app == "who"){
	$about = ' class="current_page_item" ';
	$contact = "";
	$home = "";
	$gallery = "";
}
else if ($app == "album" || $app == "video" || $app == "download"){
	$gallery = 'class="current_page_item"';
	$contact = "";
	$about = "";
	$home = "";
}
else if ($app == "findus" || $app == "team" || $app == "member" || $app == "who"){
	$gallery = '';
	$contact ='class="current_page_item"';
	$about = '';
	$home = "";
}
		$imgCalendar = $root."templates/kbbv/images/calendar.gif";

$session = SysAuthenticate::getAuthenticateObject();
		$sess_username = $session->username;
		if(!empty($sess_username)){
			$formLogin = "<div class=\"register\"><font color=\"#0000FF\">Hi $sess_username !</font> |</div>
					<div class=\"login\"><a href=\"{$root}authenticate/logout\">Logout</a></div>";
		} else {
			$formLogin = " <div class=\"login\"><a href=\"{$root}".$lang."/authenticate\"></a></div> ";
		}
?>
<title>KBBV</title>

<style>
	.fr{
		<?php echo $fr?>
	}
	.en{
		<?php echo $en?>
	}
</style>
<link rel="shortcut icon" href="<?php echo $root?>files/favicon.jpg" type="image/x-icon" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />

<link href="http://jqueryui.com/themeroller/css/parseTheme.css.php?ffDefault=Trebuchet+MS,+Tahoma,+Verdana,+Arial,+sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgI...gOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px" rel="stylesheet" type="text/css" media="screen" />
  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
  
  <script>
  $(document).ready(function() {
    $(".datepicker").datepicker({
	    	showOn: "button",
			buttonImage: "<?php echo $imgCalendar?>",
			buttonImageOnly: true
        });
  });
  </script>
<script language="javascript" type="text/javascript">
 
			function clearText(field)
			{
				if (field.defaultValue == field.value) field.value = '';
				else if (field.value == '') field.value = field.defaultValue;
			}

//			$(function(){
//				$("div.templatemo_gallery img").fullsize();
//			});
</script>


</head>
<body>
<div id="wrapper">
	<div id="header">
			<div style="height:auto; overflow:hidden">
				<div id="logo">
					<a href="<?php echo $root.$lang?>"><img src="<?php echo $root.$logo;?>" width="160px"/></a>
					<div class="slogan"><?php //echo $slogan;?> <img src="<?php echo $root;?>files/1.jpg"/> </div>
				</div>
				
				<div class="header-banner">
					<img src="<?php echo $root.$banner?>" width="900px" height="80px"/>
				</div>
		</div>
		
			<form method="post" action="" id="loginForm"> 
				<div class="wrapper-login">
					<div class="form-login-index">
							
							<div class="profile-content"> 
								<div class="profile-row" style="margin-bottom:5px">
									<div class="left-login"><?php echo $username?> :</div>
									<div class="rght-content"><input  id="username" name="username" value="" type="text" class="subc-input" /> </div>
								</div>
								<div class="profile-row" style="margin-bottom:5px">
									<div class="left-login"><?php echo $password?>:</div>
									<div class="rght-content"><input id="password" name="password" value="" type="password" class="subc-input"/></div>
								</div>
								
							</div>
							<input type="submit" class="button1" value="Login" name="register" style="margin-left: 0px;"/>
							<a href="{$root}member" style="margin-left:10px;"><?php echo $register?> | </a>
							<a href="{$root}users/forgot" > <?php echo $forgot?></a>
					        <input type="hidden" name="app" value="authenticate" />
					        <input type="hidden" name="act" value="login" />
							<!-- <a href="{$fogotpassword}">Forgot password</a> -->
							
						</div>
						<img src="<?php echo $root?>files/login-button-grey.png" class="btn-login" style="<?php echo $dis?>"/>
					</div>
				</form>
				
			
	</div>
	
	<div class="language">
						
						<div>
						<a class="">Login</a> | <a href="">Register</a>
						<?php echo $formLogin?><?php echo $flagsHtml?></div>				
				</div>
	<script>
		$(".btn-login").click(function() {
			
			  $(".form-login-index").toggle("4000");
		});
	</script>
	<!-- end #header -->
	<div id="menu">
		<ul>
			<li <?php echo $home?>><a href="<?php echo $root.$lang;?>"><?php echo $homes?></a></li>
			<li <?php echo $about?>><a href="<?php echo $root.$lang?>/who"><?php echo $aboutus?></a></li>
			<li <?php echo $gallery?>><a href="<?php echo $root.$lang?>/album"><?php echo $gallerys?></a></li>
			
			<li <?php echo $contact?> > <a  style="border-right: 1px solid #222222;" href="<?php echo $root.$lang?>/team"><?php echo $contacts?></a></li>
		</ul>
	</div>
	<!-- end #menu -->
	<div id="page">
		<div id="page-bgtop">
			<div id="page-bgbtm">
				<?php
						SysResponse::printAppContent ();
					?>		
			
				<div style="clear: both;">&nbsp;</div>
			</div>
		</div>
	</div>
	<!-- end #page -->
</div>
<div id="footer">
<div class="like">

					<div style="width: 100%;">
						<a class="facebook" target="_blank" href="<?php echo $fb_link?>"></a>
						<a class="twitter" target="_blank" href="<?php echo $twitter_link?>"></a>
						<a class="google"  target="_blank" href="<?php echo $google_link?>"></a>
					</div>
				</div>
	<p><?php echo $footer?></p>
</div>
<!-- end #footer -->
</body>
			
						
</html>